<SECTION>
<FILE>gtknative</FILE>
GtkNative
-GtkNativeInterface
gtk_native_get_for_surface
gtk_native_get_surface
gtk_native_get_renderer
#include "gtkcssstyleprivate.h"
#include "gtkcssnodeprivate.h"
#include "gtkcsstypesprivate.h"
-#include "gtknative.h"
+#include "gtknativeprivate.h"
#include "gtkpicture.h"
#include "gtkcssboxesimplprivate.h"
#include "gtkcssnumbervalueprivate.h"
}
event_widget = gtk_get_event_widget (event);
- grab_widget = gtk_native_get_for_surface (grab_surface);
+ grab_widget = GTK_WIDGET (gtk_native_get_for_surface (grab_surface));
if (grab_widget &&
gtk_main_get_window_group (grab_widget) != gtk_main_get_window_group (event_widget))
surface = gdk_event_get_surface (event);
if (surface && !gdk_surface_is_destroyed (surface))
- return gtk_native_get_for_surface (surface);
+ return GTK_WIDGET (gtk_native_get_for_surface (surface));
return NULL;
}
#include "config.h"
-#include "gtknative.h"
+#include "gtknativeprivate.h"
#include "gtkcssnodeprivate.h"
#include "gtkwidgetprivate.h"
#include "gdk/gdk-private.h"
*
* Returns: (transfer none): the #GtkNative that is associated with @surface
*/
-GtkWidget *
+GtkNative *
gtk_native_get_for_surface (GdkSurface *surface)
{
GtkWidget *widget;
widget = (GtkWidget *)gdk_surface_get_widget (surface);
if (widget && GTK_IS_NATIVE (widget))
- return widget;
+ return GTK_NATIVE (widget);
return NULL;
}
GDK_AVAILABLE_IN_ALL
G_DECLARE_INTERFACE (GtkNative, gtk_native, GTK, NATIVE, GtkWidget)
-/**
- * GtkNativeIface:
- *
- * The list of functions that must be implemented for the #GtkNative interface.
- */
-struct _GtkNativeInterface
-{
- /*< private >*/
- GTypeInterface g_iface;
-
- /*< public >*/
- GdkSurface * (* get_surface) (GtkNative *self);
- GskRenderer * (* get_renderer) (GtkNative *self);
-
- void (* get_surface_transform) (GtkNative *self,
- double *x,
- double *y);
-
- void (* check_resize) (GtkNative *self);
-};
GDK_AVAILABLE_IN_ALL
-GtkWidget * gtk_native_get_for_surface (GdkSurface *surface);
+GtkNative * gtk_native_get_for_surface (GdkSurface *surface);
GDK_AVAILABLE_IN_ALL
void gtk_native_check_resize (GtkNative *self);
--- /dev/null
+#ifndef __GTK_NATIVE_PRIVATE_H__
+#define __GTK_NATIVE_PRIVATE_H__
+
+#include "gtknative.h"
+
+G_BEGIN_DECLS
+
+/**
+ * GtkNativeIface:
+ *
+ * The list of functions that must be implemented for the #GtkNative interface.
+ */
+struct _GtkNativeInterface
+{
+ /*< private >*/
+ GTypeInterface g_iface;
+
+ /*< public >*/
+ GdkSurface * (* get_surface) (GtkNative *self);
+ GskRenderer * (* get_renderer) (GtkNative *self);
+
+ void (* get_surface_transform) (GtkNative *self,
+ double *x,
+ double *y);
+
+ void (* check_resize) (GtkNative *self);
+};
+
+G_END_DECLS
+
+#endif /* __GTK_NATIVE_PRIVATE_H__ */
#include "gtkbuildable.h"
#include "gtktooltipprivate.h"
#include "gtkcssboxesimplprivate.h"
-#include "gtknative.h"
+#include "gtknativeprivate.h"
#include "gtkrender.h"
#include "gtkstylecontextprivate.h"
#include "gtkcssboxesimplprivate.h"
#include "gtkcssnumbervalueprivate.h"
#include "gtkstylecontextprivate.h"
+#include "gtknativeprivate.h"
#include "gtkintl.h"
#include <gtk/gtk.h>
g_return_val_if_fail (GDK_IS_SURFACE (surface), NULL);
- event_widget = gtk_native_get_for_surface (surface);
+ event_widget = GTK_WIDGET (gtk_native_get_for_surface (surface));
if (!event_widget)
return NULL;
GtkWidget *native;
if (surface)
- native = gtk_native_get_for_surface (surface);
+ native = GTK_WIDGET (gtk_native_get_for_surface (surface));
else
native = NULL;
#include "gtksizerequest.h"
#include "gtkwindowprivate.h"
#include "gtkwidgetprivate.h"
-#include "gtknative.h"
+#include "gtknativeprivate.h"
#include "gtkcssboxesimplprivate.h"
struct _GtkTooltipWindow
#include "gtkpointerfocusprivate.h"
#include "gtkprivate.h"
#include "gtkroot.h"
-#include "gtknative.h"
+#include "gtknativeprivate.h"
#include "gtksettings.h"
#include "gtkshortcut.h"
#include "gtkshortcutcontroller.h"
pointer_surface = gdk_device_get_surface_at_position (device, NULL, NULL);
if (pointer_surface)
- widget = gtk_native_get_for_surface (pointer_surface);
+ widget = GTK_WIDGET (gtk_native_get_for_surface (pointer_surface));
if (widget)
{